//
//  LSZEmptyDataVC.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/6/6.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZEmptyDataVC.h"

@implementation LSZEmptyDataVC
{
    UIImageView * imageViewKong;
}
- (instancetype)init {
    self = [super init];
    if (self) {
        self.frame = [UIScreen mainScreen].bounds;
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(RemoveAllSubviewsDelete) name:@"RemoveAllSubviews" object:nil];//删除通知
        imageViewKong = [[UIImageView alloc]init];
        imageViewKong.image = [UIImage imageNamed:@"空空"];
        [self addSubview:imageViewKong];
    }
    return self;
}
- (void)showWithView:(UIView *)view
{
    if (ScreenWidth == 320) {
        imageViewKong.frame = CGRectMake((ScreenWidth-270)/2, (view.frame.size.height-100-148)/2,270, 148.9);
    }else if(ScreenWidth == 375){
        imageViewKong.frame = CGRectMake((ScreenWidth-300)/2,(view.frame.size.height-100-166.5)/2,300 , 166.5);
    }else {
        imageViewKong.frame = CGRectMake((ScreenWidth-330)/2,(view.frame.size.height-100-183.2)/2,330 , 183.2);
    }
    [view addSubview:self];
}
 -(void)RemoveAllSubviewsDelete
{
    [self removeFromSuperview];
}
@end
